import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity('tb_sys_user', {
  comment: '系统用户表',
})
export class SysUser {
  @PrimaryGeneratedColumn('increment', { comment: '自增主键', unsigned: true })
  id: number;

  @Column({ comment: '系统角色' })
  roleId: number;

  @Column({ comment: '电话号码' })
  phone: string;

  @Column({ comment: '登录密码' })
  password: string;

  @Column({ comment: '用户昵称' })
  nickname: string;

  @Column({ comment: '用户头像' })
  avatar: string;

  @Column({ comment: '用户状态' })
  status: string;

  @Column({ comment: '预设账号', type: 'tinyint', default: false })
  preset: boolean;
}
